<template>
  <div>
    <my-bread :list="['订单管理', '订单列表']"></my-bread>
    <el-card class="box-card">
      <el-row :gutter="20">
        <el-col :span="6"
          ><el-input placeholder="请输入内容" v-model="reqParams.query">
            <el-button
              slot="append"
              icon="el-icon-search"
              @click="search()"
            ></el-button>
          </el-input>
        </el-col>
      </el-row>
      <el-table :data="ordersList" border style="width: 100%">
        <el-table-column type="index" label="序号"> </el-table-column>
        <el-table-column prop="order_number" label="订单编号">
        </el-table-column>
        <el-table-column prop="order_price" label="订单价格"> </el-table-column>
        <el-table-column label="是否付款">
          <template slot-scope="scope">
            {{ scope.row.pay_status === "1" ? "未付款" : "已付款" }}
          </template>
        </el-table-column>
        <el-table-column prop="is_send" label="是否发货"> </el-table-column>
        <el-table-column label="下单时间">
          <template slot-scope="scope">
            {{ scope.row.create_time | ft }}
          </template>
        </el-table-column>
        <el-table-column label="操作">
          <el-button
            type="primary"
            icon="el-icon-location"
            size="mini"
            circle
            @click="DialogFormVisible = true"
          ></el-button>
        </el-table-column>
      </el-table>
      <!-- 分页 -->
      <el-pagination
        background
        layout="prev, pager, next"
        :current-page="reqParams.pagenum"
        :page-count="total"
        @current-change="pager"
      >
      </el-pagination>
    </el-card>

    <el-dialog title="物流信息" :visible.sync="DialogFormVisible">
      <el-timeline>
        <el-timeline-item
          v-for="(activity, index) in activities"
          :key="index"
          :timestamp="activity.time"
        >
          {{ activity.context }}
        </el-timeline-item>
      </el-timeline>
    </el-dialog>
  </div>
</template>

<script>
import mixin from "./Orders-Mixin";
export default {
  mixins: [mixin]
};
</script>

<style lang="less" scoped></style>
